const {TouchBar} = require('electron');

const homeBtn = new TouchBar.TouchBarButton({
    label: '🏡',
    backgroundColor: '#7851A9',
    click: () => {
        console.log('TouchBar Click')
    }
});

const searchBtn = new TouchBar.TouchBarButton({
    label: '🔍',
    backgroundColor: '#81c8af',
    click: () => {
        console.log('Search Click')
    }
});

const settingBtn = new TouchBar.TouchBarButton({
    label: '设置',
    backgroundColor: '#e09238',
    click: () => {
        console.log('Setting click')
    }
});

let touchBar = new TouchBar({
    items: [
        homeBtn, searchBtn, new TouchBar.TouchBarSpacer({size: "flexible"}), settingBtn
    ]
});

module.exports = touchBar;
